
#include <event/events.h>

namespace events
{

  EndThread::EndThread(unsigned long queue) : Event(ENDTHREAD_EVENT, queue)
  {
  }

  PrintConsole::PrintConsole(std::string message) : Event(PRINTCONSOLE_EVENT, MAIN_QUEUE)
  {
    _message = message;
  }

  const std::string & PrintConsole::getMessage()
  {
    return _message;
  }

  Event * PrintConsole::copy() const {
    PrintConsole * event = new PrintConsole(_message);
    return event;
  }

  LoadResource::LoadResource(unsigned long type, std::string filename) : Event(LOADRESOURCE_EVENT, MAIN_QUEUE) {
    _typey = type;
    _filename = filename;
  }

  const std::string & LoadResource::getFilename() const {
    return _filename;
  }

  unsigned long LoadResource::getFileType() const {
    return _typey;
  }

  Event * LoadResource::copy() const {
    LoadResource * event = new LoadResource(_typey, _filename);
    return event;
  }

  ReportResourceID::ReportResourceID(long index) : Event(REPORTRESOURCEID_EVENT, APP_QUEUE) {
    _index = index;
  }

  long ReportResourceID::getIndex() const {
    return _index;
  }

  Event * ReportResourceID::copy() const {
    ReportResourceID * event = new ReportResourceID(_index);
    return event;
  }

  RegisterInput::RegisterInput(unsigned long input, Event * event) : Event(REGISTERINPUT_EVENT, MAIN_QUEUE) {
    _event = event;
    _input = input;
  }

  RegisterInput::~RegisterInput() {
    delete _event;
  }

  unsigned long RegisterInput::getInput() const {
    return _input;
  }

  Event * RegisterInput::getEvent() const {
    return _event;
  }

  Event * RegisterInput::copy() const {
    RegisterInput * event = new RegisterInput(_input, _event->copy());
    return event;
  }

}; // end namespace events

